package com.dcw.lixb.designmode.filter;

import java.util.ArrayList;
import java.util.List;

/**
 * @author lixiaobin
 * @date 2020-07-21 15:01:28
 * @desc 描述信息
 */
public class CriteriaSingle implements Criteria {
    @Override
    public List<Person> meetCriteria(List<Person> persons) {
        List<Person> ret = new ArrayList<>();
        if (null != persons) {
            for (Person p : persons) {
                if ("SINGLE".equalsIgnoreCase(p.getMaritalStatus())) {
                    ret.add(p);
                }
            }
        }
        return ret;
    }
}
